Skip to content

feat(ui): add /prompt-color command for custom user input echo color - #2110

Open
Mr-Nothing-L wants to merge 1 commit into
MoonshotAI:mainfrom
Mr-Nothing-L:feat/prompt-color
Open

feat(ui): add /prompt-color command for custom user input echo color#2110
Mr-Nothing-L wants to merge 1 commit into
MoonshotAI:mainfrom
Mr-Nothing-L:feat/prompt-color

Conversation

@Mr-Nothing-L

@Mr-Nothing-L Mr-Nothing-L commented Apr 28, 2026

Copy link
Copy Markdown

Motivation

In the current terminal theme, user input and model replies share nearly identical foreground colors with no visual delimiter between turns. During long sessions this makes it hard to quickly scan for human prompts. Allowing users to style their own echo(color&bold) creates a clear visual boundary and improves readability.

The implementation reuses Rich Style, so passing bold green achieves both boldface and color tint in one setting without extra fields.

Changes

  • config.py — add prompt_text_color field
  • theme.py — add runtime state + getter/setter for user echo color
  • echo.py — apply Rich style to user text in render_user_echo* helpers
  • ui/shell/__init__.py — sync color from runtime config on shell startup
  • slash.py — introduce /prompt-color with Rich Style validation, config persistence, and hot-reload

Design Notes

  • Accepts any valid Rich Style string (e.g. bold cyan, #ff6600) — no custom parser needed
  • Hot-reload: changes take effect immediately without restarting the session (unlike /theme, which triggers a Reload)
  • Empty default preserves backward compatibility

Usage

/prompt-color bold cyan
/prompt-color #ff6600
/prompt-color reset
Verification
• ruff check / ruff format ✅
• pyright ✅
• pytest (config + theme + echo) 56 passed ✅
e9b99960-29e2-418d-9626-9b8cce7236d2
Open in Devin Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ddbe2ff66e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/kimi_cli/ui/shell/slash.py Outdated
devin-ai-integration[bot]

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant